# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>

pkgname=gitoxide
pkgver=0.23.0
pkgrel=1
pkgdesc="An idiomatic, lean, fast & safe pure Rust implementation of Git"
url='https://github.com/Byron/gitoxide'
arch=('loong64' 'x86_64')
license=('MIT' 'Apache-2.0')
makedepends=('cargo' 'cmake')
options=(!lto)
source=(https://github.com/Byron/${pkgname}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('45b4fc2fc6f5f1ed9fb019cbae8633b6a3129f349182774b5b8c601bbb3e17db')
b2sums=('eb49dfa13488ea8a8aeaf2cdfafcf8f75695070c41d1d6556b4eea9c78cfc31302e56f43dab884256cffb4c49815a1af08d593c5900c9c0e2c85065c7beb8f3d')

prepare() {
  cd "${pkgname}-${pkgver}"
  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
  cd ${pkgname}-${pkgver}
  cargo build --frozen --release --no-default-features --features max-pure
}

package() {
  cd ${pkgname}-${pkgver}
  install -Dm 755 -t "${pkgdir}/usr/bin" \
    target/release/gix \
    target/release/ein
}

# vim: ts=2 sw=2 et:
